package com.amoyt.project.domain.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 地址表（含详细行政区域划分）
 * </p>
 *
 * @author AmoyT
 * @since 2025-08-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(description = "地址表（含详细行政区域划分）")
@TableName("address")
@Builder
public class Address implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID（Long类型）", example = "1")
    @TableId(value = "address_id", type = IdType.AUTO)
    private Long addressId;

    @Schema(description = "省份（如：广东省）", example = "广东省")
    private String province;

    @Schema(description = "城市（如：深圳市）", example = "深圳市")
    private String city;

    @Schema(description = "区/县（如：南山区）", example = "南山区")
    private String district;

    @Schema(description = "街道/乡镇（如：科技园街道，可为空）", example = "科技园街道")
    private String town;

    @Schema(description = "村（可以为空）", example = "大冲村")
    private String village;

    @Schema(description = "详细地址（如：XX路XX号XX小区X栋X单元，包含门牌号等具体信息）", example = "高新南一道1号腾讯大厦")
    private String detailAddress;

    @Schema(description = "邮政编码（可为空）", example = "518000")
    private String postalCode;

    @Schema(description = "创建时间", example = "2025-08-21 10:00:00")
    private Date createTime;

    @Schema(description = "创建人（用户ID或姓名）", example = "张三")
    private String createBy;

    @Schema(description = "更新时间", example = "2025-08-21 10:00:00")
    private Date updateTime;

    @Schema(description = "更新人（用户ID或姓名）", example = "李四")
    private String updateBy;

    @Schema(description = "逻辑删除：0-未删除，1-已删除", example = "0")
    private Integer deleted;
}
